import http from "./http"
// https://api-hmugo-web.itheima.net/api/public/v1/categories

export const categoriesAppi=()=>{
    return http ({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/categories',
        method:'get',
    })
}


// 列表:https://api-hmugo-web.itheima.net/api/public/v1/goods/search

export const searchAppi=(query)=>{
    return http ({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/goods/search',
        method:'get',
        params:{
            query
        }
    })

}

// https://api-hmugo-web.itheima.net/api/public/v1/goods/detail

export const detailAppi=(goods_id)=>{
    return http ({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/goods/detail',
        method:'get',
        params:{
            goods_id
        }
    })

}

// 搜：https://api-hmugo-web.itheima.net/api/public/v1/goods/qsearch

export const qsearchApi=(query)=>{
    return http ({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/goods/qsearch',
        method:'get',
        params:{
            query
        }
    })

}